package net.pimpas.security.serviceprovider.auth.login;

import java.util.Map;

import net.pimpas.security.serviceprovider.auth.Subject;
import net.pimpas.security.serviceprovider.auth.login.callback.CallbackHandler;

public interface LoginModule {
    void init(CallbackHandler callbackHandler,
    		Subject subject,
		    Map<String,?> sharedState,
		    Map<String,?> options);
    
    boolean login() throws LoginException, java.security.GeneralSecurityException;
    boolean commit() throws LoginException, java.security.GeneralSecurityException;
    boolean abort() throws LoginException, java.security.GeneralSecurityException;
    boolean logout() throws LoginException, java.security.GeneralSecurityException;

}